<template>
	<view class="custom-content">
		<!--顶部轮播-->
		<u-swiper :list="sliders" :height="250"></u-swiper>
		<!--三个图片菜单-->
		<view class="img-btn-box">
			<u-link href="#"><u-image mode="widthFix" src="https://mafu.oss-cn-shenzhen.aliyuncs.com/chelixin/materials/insurance/icon-btn-1.png"></u-image></u-link>
			<u-link href="#"><u-image mode="widthFix" src="https://mafu.oss-cn-shenzhen.aliyuncs.com/chelixin/materials/insurance/icon-btn-2.png"></u-image></u-link>
			<u-link href="#"><u-image mode="widthFix" src="https://mafu.oss-cn-shenzhen.aliyuncs.com/chelixin/materials/insurance/icon-btn-3.png"></u-image></u-link>
		</view>
		<!--联系客服-->
		<view style="padding: 30rpx 0;">
			<u-image mode="widthFix" @click="openCS" src="https://mafu.oss-cn-shenzhen.aliyuncs.com/chelixin/materials/insurance/contact-cs.jpg"></u-image>
		</view>

		<!-- 自定义页面 -->
		<view><u-parse ref="uParse" @imgtap="ignore" :html="pageContent"></u-parse></view>
		<u-back-top :scroll-top="scrollTop"></u-back-top>
		<wx-share :title='shop.name' :desc="shop.store_introduction" :imgUrl="shop.cover" link="/" ref="wxs"></wx-share>
		<custom-tabbar></custom-tabbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				scrollTop:0,
				shop:{},
				sliders:[
					{id:1,title:'',image:'https://mafu.oss-cn-shenzhen.aliyuncs.com/chelixin/materials/insurance/slider-1.png',path:'#',is_open:1},
					{id:2,title:'',image:'https://mafu.oss-cn-shenzhen.aliyuncs.com/chelixin/materials/insurance/slider-2.png',path:'#',is_open:1}
				],
				pageContent: "<div><img src='https://mafu.oss-cn-shenzhen.aliyuncs.com/chelixin/materials/insurance/content-1.jpg'/><img src='https://mafu.oss-cn-shenzhen.aliyuncs.com/chelixin/materials/insurance/content-2.png'/><img src='https://mafu.oss-cn-shenzhen.aliyuncs.com/chelixin/materials/insurance/content-3.jpg'/><img src='https://mafu.oss-cn-shenzhen.aliyuncs.com/chelixin/materials/insurance/content-4.png'/></div>"
			}
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		onLoad() {
			this.getShop();
		},
		mounted(){
			// this.$refs.uParse.togglePreview(false);
		},
		methods: {
			getShop() {
				this.loading = true;
				this.$u.post('/shopping/shop-setting', {}).then(res => {
					this.shop = res;
					this.loading = false;
				}).catch(e => {
			
				})
			},
			ignore(event){
				event.ignore();
			},
			openCS(){
				location.href='https://work.weixin.qq.com/kfid/kfc6d3aceb85522e2b7'	
			},
		}
	}
</script>

<style scoped>
.custom-content{
	line-height: 0;
}
p{
	line-height: 0;
}
img{
	max-width: 100%;
}
.img-btn-box{
	display:flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	padding-top: 30rpx;
	padding-bottom:0;
}
.img-btn-box a{
	display: block;
	height: 180rpx;
	width: 32%;
	display: flex;
	align-items: center;
	background-color: #fff;
	/* display:inline-block; */
	/* width: 33%;; */
}
</style>
